﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Data.Linq;

namespace VSSAHT.DataAccess
{
    public static class VersionConverter
    {
        public static string ToString(Binary input)
        {
            if (input == null) return null;

            return Convert.ToBase64String(input.ToArray());
        }

        public static Binary ToBinary(string input)
        {
            if (string.IsNullOrEmpty(input)) return null;

            return new Binary(Convert.FromBase64String(input));
        }

    }
}
